#include <crt_proctl.h>

_pinstance GetInstance(void)
{
	_pinstance  p;
#if (TARGET_OS == OS_WINDOWS)
	p = GetModuleHandle(0);
#elif (TARGET_OS == OS_POSIX)
	p = getpid();
#elif (TARGET_OS == OS_DARWIN)
	p = 0;
#endif
	return p;
}
